package com.ruoyi.purchase.pojo;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 采购订单对象 t_purchase_order
 *
 * @author ruoyi
 * @date 2024-10-25
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PurchaseOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Integer id;

    /** 采购订单编号 */
    @Excel(name = "采购订单编号")
    private String purchaseOrderNo;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Integer supplierId;

    /** 采购员id */
    @Excel(name = "采购员id")
    private Integer orderUserId;

    /** 审核人id */
    @Excel(name = "审核人id")
    private Integer eorderUserId;

    /** 采购申请id */
    @Excel(name = "采购申请id")
    private Integer purchaseApplyId;

    /**
     * 总金额
     */
    @Excel(name = "总金额")
    private Double orderPrice;

    /** 预计交单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预计交单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planOrderDate;

    /** 实际交单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "实际交单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /** 状态0未审核;1审核通过:2审核驳回 */
    @Excel(name = "状态0未审核;1审核通过:2审核驳回")
    private Integer status;

    /** 供应商*/
    private String supplierName;

    /** 采购员*/
    private String orderUserName;

    /** 申请人名称*/
    private String applyUserName;

    /**
     * 申请部门名称
     */
    private String deptName;

    /** 申请编号*/
    private String purchaseApplyNo;

    /** 审核人*/
    private String eorderUserName;

    private String supplierTel;

    /** 物料清单表*/
    private List<PurchaseOrderMaterial> purchaseOrderMaterials;
}
